JCAT.Class.CheckDependClasses(['JCAT.MVC','JCAT.MVC.UICtrl'],'JCAT.MVC.UICtrl.IForm') ;

JCAT.MVC.UICtrl.IForm = function()
{
	this._arrDataVerifies = new Array() ;
}

JCAT.Class.CreateAbstractMethod('JCAT.MVC.UICtrl.IForm.prototype.SetData') ;
JCAT.Class.CreateAbstractMethod('JCAT.MVC.UICtrl.IForm.prototype.GetData') ;
JCAT.Class.CreateAbstractMethod('JCAT.MVC.UICtrl.IForm.prototype.GetDataLength') ;


JCAT.MVC.UICtrl.IForm.prototype.AddDataVerifier = function (aDataVerifier)
{
	if( typeof(aDataVerifier)!='object' || !JCAT.Class.HasImplements(aDataVerifier,JCAT.MVC.DataVerifier.IDataVerifier) )
	{
		throw new Error(
			JCAT.Language.Sentence('参数 aDataVerifier 必须为实现接口 JCAT.MVC.IDataVerifier 的对象。','JCAT.JS',null)
		) ;
	}
	
	this._arrDataVerifies.push(aDataVerifier) ;
}

JCAT.MVC.UICtrl.IForm.prototype.VerifyData = function ()
{
	for(var idx=0; idx<this._arrDataVerifies.length; idx++)
	{
		Result = this._arrDataVerifies[idx].VerifyData(this) ;
		if( Result!==true )
		{
			return Result ;
		}
	}
	
	return true ;
}